﻿using CloudSail.Exam.InfrastructureDto.Response.ResultDto;
using CloudSail.Exam.Service.Instance;
using Main.Extend.Attributes;
using Main.Server;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;

namespace Main.Service
{
    [Provider, Inject]
    public class UserService : ApiResultService
    {
        public UserService(BaseServer baseServer, IConfiguration configuration) : base(baseServer, configuration)
        {

        }

        public async Task<ApiResult> Query()
        {
            var mark = _Server.User.QueryAll();

            return Ok(await mark.ToListAsync());

        }

    }
}
